import request from './request';
let that = this;

// let urlexcel = 'https://api.io.51shoubei.com'
// let url = 'https://open.51shoubei.com' //正式
let urlexcel = 'https://pay.kaisagoldenbayresort.com/product'
let url = 'https://pay.kaisagoldenbayresort.com/product' //正式


// let urlexcel = 'http://open.51eagle.com/jzyproduct'//测试
// let url = 'http://open.51eagle.com/jzyproduct' //测试

export function updatepassword (data) { // 忘记密码
    return request({
        url: url + '/v3/sbapi/users/update/password',
        method: 'post',
        data,
    })
}

export function sms (params) { //获取验证码
    return request({
        url: url + '/v3/api/user/sms',
        method: 'get',
        params,

    })
}
export function getBindPhone (params) { //获取手机号
    return request({
        url: url + '/v3/sbapi/users/getBindPhone',
        method: 'get',
        params,

    })
}
export function getservice (params) { //服务商级别
    return request({
        url: url + '/v31/api/agent/list',
        method: 'get',
        params,
        // headers: {"Content-Type":'application/json'}
        headers: {
            "token": sessionStorage.getItem('token')
        }

    })
}
export function getBD (params) {
    return request({
        url: url + '/v31/api/bd/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }

    })
}
export function province (params) { //省列表
    return request({
        url: url + '/v3/sbapi/province/std/list',
        method: 'get',
        params,
        // headers: {"Content-Type":'application/json'}

    })
}
export function city (params) { //市列表
    return request({
        url: url + '/v3/sbapi/city/std/list',
        method: 'get',
        params,
        // headers: {"Content-Type":'application/json'}

    })
}
export function county (params) { //区列表
    return request({
        url: url + '/v3/sbapi/county/std/list',
        method: 'get',
        params,
        // headers: {"Content-Type":'application/json'}

    })
}
export function wx1 (params) { //行业一级
    return request({
        url: url + '/v3/sbapi/mcc/wx1/list',
        method: 'get',
        params,
        // headers: {"Content-Type":'application/json'}

    })
}

export function wx2 (params) { //行业二级
    return request({
        url: url + '/v3/sbapi/mcc/wx2/list',
        method: 'get',
        params,
        // headers: {"Content-Type":'application/json'}

    })
}
export function wx3 (params) { //行业三级
    return request({
        url: url + '/v3/sbapi/mcc/wx3/list',
        method: 'get',
        params,
        // headers: {"Content-Type":'application/json'}

    })
}
export function getChannelList (params) { //我的商户 获取通道类型
    return request({
        url: url + '/v31/api/channel/getChannelList',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function merchantlist (params) { //商户列表分页
    return request({
        url: url + '/v31/api/merchant/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }


    })
}
export function allmerchantlist (params) { //获取总店列表
    return request({
        url: url + '/v31/api/merchant/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }


    })
}

export function merchantall (params) { //全部商户
    return request({
        url: url + '/v31/api/merchant/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }


    })
}
export function blockup (params, id) { //停用商户
    return request({
        url: url + '/v31/api/merchant/delete/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }


    })
}
export function merchantremove (params, id) { //注销商户
    return request({
        url: url + '/v31/api/merchant/remove/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }


    })
}

export function getActiveCount (params) { //动销商户列表
    return request({
        url: url + '/v31/api/merchant/getActiveCount',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }


    })
}
export function login (params) { //登录
    return request({
        url: url + '/v31/api/user/login',
        method: 'post',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded'
        }
    })
}

export function shop (params) { //门店列表
    return request({
        url: url + '/v31/api/merchant/shop/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }


    })
}

export function merchantdetails (params, no) { //商户详情
    return request({
        url: url + '/v31/api/merchant/get/' + no,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }


    })
}

export function channel (params) { //商户通道
    return request({
        url: url + '/v31/api/merchant/channel/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }


    })
}
export function addshop (params) { //增加门店
    return request({
        url: url + '/v31/api/merchant/shop/open/save',
        method: 'post',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function shopupdate (params, id) { //修改门店
    return request({
        url: url + '/v31/api/merchant/shop/open/update/' + id,
        method: 'put',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function shopenable (data, id) { //启用门店
    return request({
        url: url + '/v31/api/merchant/shop/enable/' + id,
        method: 'post',
        data,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}


export function getTotalShopCount (params) { //总门店数
    return request({
        url: url + '/v31/api/merchant/shop/getTotalShopCount',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}

export function getMerchantShop (params, id) {//门店信息
    return request({
        url: url + '/v31/api/merchant/shop/get/' + id,
        method: 'get',
        params,
        headers: { "token": sessionStorage.getItem('token') }
    })
}

export function channellist (params) { //通道列表
    return request({
        url: url + '/v31/api/inst/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}

export function agent (params) { //服务商列表
    return request({
        url: url + '/v31/api/agent/page',
        // url: "http://192.168.5.172/v31/api/agent/page",
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}

export function addchannel (params) { //新增渠道
    return request({
        url: url + '/v31/api/inst/save',
        // url: "http://192.168.5.172/v31/api/inst/save",
        method: 'post',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function channelupdate (params, id) { //修改渠道
    return request({
        url: url + '/v3/sbapi/inst//update/' + id,
        method: 'put',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}

export function getSelect (params) { //角色机构类型查询
    return request({
        url: url + '/v31/api/inst/getSelect',
        method: 'get',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function menulist (params) { //系统菜单
    return request({
        url: url + '/v31/api/menu/list',
        method: 'get',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}

export function getNodeMenu (params) { //系统菜单
    return request({
        url: url + '/v31/api/menu/getNodeMenu',
        method: 'get',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function menuysave (params) { //新建系统菜单
    return request({
        url: url + '/v31/api/menu/save',
        method: 'POST',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function meundelete (params, id) { //删除统菜单
    return request({
        url: url + '/v31/api/menu/delete/' + id,
        method: 'POST',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function meunenable (params, id) { //删除统菜单
    return request({
        url: url + '/v31/api/menu/enable/' + id,
        method: 'POST',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getAllMenu (params) { //更新菜单
    return request({
        url: url + '/v31/api/menu/getAllMenu',
        method: 'get',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function roleslist (params) { //角色列表
    return request({
        url: url + '/v31/api/roles/list',
        method: 'get',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getOwnedMenu (params) { //角色权限列表
    return request({
        url: url + '/v31/api/roles/getOwnedMenu',
        method: 'get',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function updateRoleMenu (params) { //修改角色权限
    return request({
        url: url + '/v31/api/roles/updateRoleMenu',
        method: 'POST',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function shopdelete (params, id) { //注销门店
    return request({
        url: url + '/v31/api/merchant/shop/remove/' + id,
        method: 'POST',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getAccountList (params) { //用户 账号管理 获取列表数据
    return request({
        url: url + '/v31/api/user/page',
        // url:'http://192.168.5.172/v31/api/user/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getUserTypes (params) { //用户 账号管理 获取所有用户类型
    return request({
        url: url + '/v31/api/user/getQueryRoles',
        // url: "http://192.168.5.172/v31/api/user/getQueryRoles",
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getAddUserTypes (params) { //用户 账号管理 新增账号获取所有用户类型
    return request({
        url: url + '/v31/api/user/getCreateRoles',
        // url: "http://192.168.5.172/v31/api/user/getCreateRoles",
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function addAccount (params) { //用户 账号管理 新增账号
    return request({
        url: url + '/v31/api/user/save',
        // url:'http://192.168.5.172/v31/api/user/save',
        method: 'POST',
        params,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function updateUser (params) { //用户 账号管理 修改账户信息
    return request({
        url: url + '/v31/api/user/update',
        // url:'http://192.168.5.172/v31/api/user/update',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function disableUser (params, id) { //用户 账号管理 停用账号
    return request({
        url: url + '/v31/api/user/disable/' + id,
        // url:'http://192.168.5.172/v31/api/user/disable/'+ id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postuserdelete (params, id) { //用户 账号管理 启用账号
    return request({
        url: url + '/v31/api/user/delete/' + id,
        // url:'http://192.168.5.172/v31/api/user/enable/'+ id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function enableUser (params, id) { //用户 账号管理 删除账号
    return request({
        url: url + '/v31/api/user/enable/' + id,
        // url:'http://192.168.5.172/v31/api/user/enable/'+ id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function resetPassword (params, id) { //用户 账号管理 重置密码
    return request({
        url: url + '/v31/api/user/resetPassword/' + id,
        // url:'http://192.168.5.172/v31/api/user/resetPassword/'+ id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getUserSelect (params) { //用户 账号管理 新增账号 模糊查询
    return request({
        url: url + '/v31/api/inst/getSelect',
        // url:'http://192.168.5.172/v31/api/inst/getSelect',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getStoreList (params) { //用户 账号管理 新增账号 获取门店列表
    return request({
        url: url + '/v31/api/merchant/shop/list',
        // url:'http://192.168.5.172/v31/api/merchant/shop/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postUserList (params) { //用户 账号管理 新增账号
    return request({
        url: url + '/v31/api/user/save',
        // url:'http://192.168.5.172/v31/api/user/save',
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function channelget (params, id) { // 获取支付配置
    return request({
        url: url + '/v31/api/merchant/channel/get/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function updatewx (params, id) { // 修改微信支付配置
    return request({
        url: url + '/v31/api/merchant/channel/update/wx/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function updateali (data, id) { // 修改微信支付配置
    return request({
        url: url + '/v31/api/merchant/channel/update/alipay/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function ratelist (params) { // 费率列表
    return request({
        url: url + '/v31/api/merchant/rate/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function updaterate (params, id) { // 修改微信费率
    return request({
        url: url + '/v31/api/merchant/channel/wx/update/rate/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function aliupdaterate (params, id) { // 修改支付宝费率
    return request({
        url: url + '/v31/api/merchant/channel/ali/update/rate/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function uniupdaterate (params, id) { // 修改云闪付费率
    return request({
        url: url + '/v31/api/merchant/channel/uni/update/rate/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}

export function deleteAgency (params, id) { //机构管理  删除机构
    return request({
        url: url + '/v31/api/inst/delete/' + id,
        // url:'http://192.168.5.172/v31/api/inst/delete/'+id,
        method: 'put',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function updateAgency (params, id) { //机构管理  修改提交
    return request({
        url: url + '/v31/api/inst/update/' + id,
        // url:'http://192.168.5.172/v31/api/inst/update/'+id,
        method: 'put',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getServiceData (params, id) { //服务商  详情页获取数据
    return request({
        url: url + '/v31/api/agent/get/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function deleteServiceProviders (params, id) { //服务商  删除服务商
    return request({
        url: url + '/v31/api/agent/delete/' + id,
        method: 'put',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getLastService (params) { //服务商 新增弹框 获取一级服务商
    return request({
        url: url + '/v31/api/agent/list/',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function addServiceProviders (params) { //服务商  新增服务商提交
    return request({
        url: url + '/v31/api/agent/save',
        // url:'http://192.168.5.172/v31/api/agent/save',
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function updateServiceProviders (params, id) { //服务商 详情页面 修改提交
    return request({
        url: url + '/v31/api/agent/update/' + id,
        method: 'put',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getPaymentList (params) { //服务商 详情页面 支付列表查询
    return request({
        url: url + '/v31/api/agent/profit/page',
        // url:'http://192.168.5.172/v31/api/agent/profit/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getConfigureChannels (params, id) { //服务商 详情页面 渠道配置获取数据
    return request({
        url: url + '/v31/api/agent/getchannels/' + id,
        // url:'http://192.168.5.172/v31/api/agent/getchannels/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postConfigureChannels (params, id) { //服务商 详情页面 添加渠道配置
    return request({
        url: url + '/v31/api/agent/configchannel/' + id,
        // url:'http://192.168.5.172/v31/api/agent/configchannel/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getRateList (params) { //服务商 详情页面 获取支付通道费率
    return request({
        url: url + '/v31/api/agent/rate/list',
        // url:'http://192.168.5.172/v31/api/agent/rate/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function agentRateConfirm (params, id) { //服务商  费率验证
    return request({
        url: url + '/v31/api/agent/rate/confirm/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postSubmitRates (params, id) { //服务商 详情页面 修改提交支付通道费率
    return request({
        url: url + '/v31/api/agent/rate/update/' + id,
        // url:'http://192.168.5.172/v31/api/agent/rate/update/'+ id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getdimensionTagList (params) { //服务商 详情页面 获取指定对象已拥有的标签
    return request({
        url: url + '/v31/api/dimensionTag/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getSelectTagsByRole (params) { //服务商 详情页面 获取指定对象可添加标签
    return request({
        url: url + '/v31/api/tag/getSelectTagsByRole',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postDimensionTagSave (data) { //服务商 详情页面 给指定对象添加标签
    return request({
        url: url + '/v31/api/dimensionTag/save',
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getBdList (params) { //业务经理列表
    return request({
        url: url + '/v31/api/bd/page',
        // url: "http://192.168.5.172/v31/api/bd/page",
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function addBdManager (params) { //新增业务经理
    return request({
        url: url + '/v31/api/bd/save',
        // url: "http://192.168.5.172/v31/api/bd/save",
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function deleteBD (params, id) { //服务商  删除服务商
    return request({
        url: url + '/v31/api/bd/delete/' + id,
        method: 'put',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getBdData (params, id) { //业务经理  详情页获取数据
    return request({
        url: url + '/v31/api/bd/get/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function reviseBusiness (params, id) { //服务商 详情页面 修改提交
    return request({
        url: url + '/v31/api/bd/update/' + id,
        method: 'put',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getBankAccount (params) { //清算查询查询 获取列表数据
    return request({
        url: url + '/v31/api/trade/getSettlement',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getClearingQuery (params) { //清算查询查询 获取列表数据
    return request({
        url: url + '/v31/api/trade/transaction/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getClearingExport (params) { //清算查询查询 导出数据
    return request({
        url: url + '/v31/api/trade/transaction/excel',
        method: 'get',
        params,
        responseType: 'arraybuffer', // 代表内存之中的一段二进制数据 必须加
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getProfits (params) { //分润统计 获取列表数据
    return request({
        url: url + '/v31/api/trade/getProfits/statistics',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getProfitsBdDetail (params) { //分润统计 获取下级分润详情
    return request({
        url: url + '/v31/api/trade/getProfits/statistics/bdDetail',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getAgentStatistics (params) { //服务商交易统计 获取列表数据
    return request({
        url: url + '/v31/api/trade/getAgentStatistics',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getMerchantProfits (params) { //服务商交易统计 统计详情
    return request({
        url: url + '/v31/api/trade/getMerchantProfits',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}

export function getSettlement (params, id) { // 获取通道结算周期列表
    return request({
        url: url + '/v31/api/channel/getSettlement/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function channelselect (params) { // 切通道下拉列表
    return request({
        url: url + '/v31/api/merchant/channel/select',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function channelselects (params, id) { // 获取可选通道下拉列表
    return request({
        url: url + '/v31/api/merchant/channel/select/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}

export function updatechannel (params, id) { // 切换通道
    return request({
        url: url + '/v31/api/merchant/update/channel/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function applist (params) { // 获取微信关注列表
    return request({
        url: url + '/v31/api/merchant/app/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function updatesettlement (params, id) { // 修改结算周期
    return request({
        url: url + '/v31/api/merchant/channel/update/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function alipayauth (params, id) { // 支付宝口碑配置
    return request({
        url: url + '/v31/alipay/get/auth/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function addbank (params, id) { // 配置银联商户号
    return request({
        url: url + '/v31/api/merchant/addbank/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function updateBankRate (params, id) { // 修改银行卡费率
    return request({
        url: url + '/v31/api/merchant/updateBankRate/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function deletechannel (params, id) { // 停用通道
    return request({
        url: url + '/v31/api/merchant/channel/delete/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function addchannels (params) { // add通道
    return request({
        url: url + '/v31/api/merchant/channel/save',
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        },
        timeout: '60000',
    })
}
export function registerQiMai (params, id) { // 开通智慧零售
    return request({
        url: url + '/v31/api/merchant/registerQiMai/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function menuupdate (params, id) { // 修改菜单
    return request({
        url: url + '/v31/api/menu/update/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function terminallist (params, id) { // 终端列表
    return request({
        url: url + '/v31/api/terminal/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function shopall (params) { // 通过商户获取门店
    return request({
        url: url + '/v31/api/merchant/shop/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function terminalsave (params) { // 添加终端
    return request({
        url: url + '/v31/api/terminal/save',
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function terminaldelete (params, id) { // 删除终端
    return request({
        url: url + '/v31/api/terminal/delete/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function terminalupdate (params, id) { // 修改终端
    return request({
        url: url + '/v31/api/terminal/update/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function devicepage (params) { // 设备列表
    return request({
        url: url + '/v31/api/device/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function devicesave (params) { // 添加设备
    return request({
        url: url + '/v31/api/device/save',
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function devicebind (params, id) { // 绑定设备
    return request({
        url: url + '/v31/api/device/bind/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function deviceremove (params, id) { // 解绑设备
    return request({
        url: url + '/v31/api/device/remove/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function merchantstatistics (params) { // 商户交易统计分页
    return request({
        url: url + '/v31/api/trade/list/merchant/statistics',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function merchantdetail (params) { // 商户交易统计详情
    return request({
        url: url + '/v31/api/trade/statistics/merchant/detail',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function shopstatistics (params) { // 门店交易统计分页
    return request({
        url: url + '/v31/api/shopDate/shopStatisticByDayPage',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function orderpage (params) { // 订单查询
    return request({
        url: url + '/v31/api/trade/page',
        method: 'get',
        params,
        timeout: '60000',
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function orderlist (params) { // 订单查询
    return request({
        url: url + '/v31/api/trade/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getOrderDetail (params) { // 订单统计
    return request({
        url: url + '/v31/api/trade/getOrderDetail',
        method: 'get',
        params,
        timeout: '60000',
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function tradeget (params, id) { // 订单详情
    return request({
        url: url + '/v31/api/trade/get/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function refundorder (params, id) { // 订单退款
    return request({
        url: url + '/v31/api/trade/refund/order/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function shopSumByDay (params) { // 查询门店日结统计信息
    return request({
        url: url + '/v31/api/shopDate/shopSumByDay',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function terminalrelease (params, id) { // 解绑终端
    return request({
        url: url + '/v31/api/terminal/release/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function queryorder (params, id) { // 同步订单状态
    return request({
        url: url + '/v31/api/trade/query/order/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function synchronizeKoubeiShop (params) { // 同步口碑门店
    return request({
        url: url + '/v31/api/merchant/shop/synchronizeKoubeiShop',
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function merchantenable (params, id) { // 启用商户
    return request({
        url: url + '/v31/api/merchant/enable/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}

export function getLastWeekStatisticChart (params) { // 首页 获取近七天交易总趋势
    return request({
        url: url + '/v31/api/trade/getLastWeekStatisticChart',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getMerStatisticRank (params) { // 首页 获取商户排行
    return request({
        url: url + '/v31/api/trade/getMerStatisticRank',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getCountsByPayType (params) { // 首页 获取支付方式笔数
    return request({
        url: url + '/v31/api/trade/getCountsByPayType',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getMerCountInfo (params) { // 首页 获取新增商户数量
    return request({
        url: url + '/v31/api/trade/getMerCountInfo',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getShopStatisticRank (params) { // 首页 商户登陆 门店交易排行
    return request({
        url: url + '/v31/api/trade/getShopStatisticRank',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getStatisticByRole (params) { // 首页 获取总交易金额
    return request({
        url: url + '/v31/api/trade/getStatisticByRole',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getShopTerminals (params) { // 首页 获取门店下面终端
    return request({
        url: url + '/v31/api/trade/getShopTerminals',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getQrcodeList (params) { // 二维码管理 获取列表数据
    return request({
        url: url + '/v31/api/batch/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function addQrcode (params) { // 二维码管理 添加二维码账户
    return request({
        url: url + '/v31/api/batch/save',
        method: 'post',
        params,
        timeout: '60000',
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getExportQrcode (params) { // 二维码管理 导出生成二维码
    return request({
        url: url + '/v31/api/qrcode/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function parentlist (params) { // 一级银行列表
    return request({
        url: url + '/v3/sbapi/bank/parent/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function banklist (params) { // 开户支行
    return request({
        url: url + '/v3/sbapi/bank/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function merchantsave (params) { // 新增商户
    return request({
        url: url + '/v31/api/merchant/save',
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function uploadfileget (params, id) { // 获取审核照片
    return request({
        url: url + '/v31/api/merchant/uploadfile/get/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function merchantreview (data, id) { // 审核商户
    return request({
        url: url + '/v31/api/merchant/review/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function modifypassword (params, id) { // 用户修改密码
    return request({
        url: url + '/v31/api/user/modifypassword/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jsyMer (params, id) { // 极速云 首页 商户贷款 按钮状态
    return request({
        url: url + '/v31/api/jsy/mer/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jsyMerPost (params, id) { // 极速云 首页 商户授权极速云
    return request({
        url: url + '/v31/api/jsy/mer/' + id,
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jsyGetproduct (params, id) { // 极速云 首页 商户贷款 选择产品页列表
    return request({
        url: url + '/v31/api/jsy/getproduct/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jsyNoticeUnread (params, id) { // 极速云 消息 未读消息数量
    return request({
        url: url + '/v31/api/jsy/notice/unread/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jsyNoticeList (params) { // 极速云 消息 未读消息数量
    return request({
        url: url + '/v31/api/jsy/notice/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jsyNoticeRead (params, id) { // 极速云 消息 更新极速云通知读取状态
    return request({
        url: url + '/v31/api/jsy/notice/read/' + id,
        method: 'put',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jsyGetloan (params) { // 极速云 消息 获取极速云借款记录列表
    return request({
        url: url + '/v31/api/jsy/getloan',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jsyGetrepayplan (params) { // 极速云 消息 还款计划表接口
    return request({
        url: url + '/v31/api/jsy/getrepayplan',
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getRegistryChannnel (params, id) { // 获取可选进件渠道
    return request({
        url: url + '/v31/api/merchant/getRegistryChannnel/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getMerchantHigherTags (params) {// 获取进件商户上级标签
    return request({
        url: url + '/v31/api/dimensionTag/getMerchantHigherTags/',
        method: 'get',
        params,
        headers: { "token": sessionStorage.getItem('token') }
    })
}
export function getReviewCount (params) {// 获取商户进件审核数量
    return request({
        url: url + '/v31/api/merchant/getReviewCount',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function updateToReview (data, id) { // 修改商户进件
    return request({
        url: url + '/v31/api/merchant/updateToReview/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function shopstatisticss (params) { // 门店交易统计old
    return request({
        url: url + '/v31/api/trade/list/shop/statistics',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function merchantupdate (data, id) { // 修改商户进件（渠道）
    return request({
        url: url + '/v31/api/merchant/update/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function exportExcels (params) { // 导出订单
    return request({
        url: urlexcel + '/v31/api/trade/export/excel',
        method: 'get',
        params,
        timeout: '300000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function exportRecordlist (params) {// 导出任务记录分页
    return request({
        url: url + '/v31/api/exportRecord/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function exportChayiList(params){
    return request({
        url: url + "/v31/api/differorder/list",
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function downloadChayiFile(params){
    return request({
        url: url + "//v31/api/differorder/export/excel",
        method: 'post',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function exportZhongxinList (params) { // 中信银行账单列表
    return request({
        url: url + "/v31/api/exportRecord/channel/bill/list",
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function downloadZheongxinFile (params) {
    return request({
        url: url + "/v31/api/exportRecord/channel/bill/download",
        method: 'get',
        params,
        responseType: 'blob',
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function exportRecorddelete (params, id) {// 导出任务删除
    return request({
        url: url + '/v31/api/exportRecord/delete/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}

export function exportExcel (params) { // 导出订单  (废弃)
    return request({
        url: urlexcel + '/v31/api/trade/export/excel',
        method: 'get',
        params,
        timeout: '600000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function merchantexcel (params) { // 导出商户交易统计
    return request({
        url: urlexcel + '/v31/api/trade/export/merchant/excel',
        method: 'get',
        params,
        timeout: '180000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}

export function shopDateexportExcel (params) { // 导出门店日结
    return request({
        url: urlexcel + '/v31/api/shopDate/exportExcel',
        method: 'get',
        params,
        timeout: '60000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function statisticexcel (params) { // 导出服务商交易统计
    return request({
        url: urlexcel + '/v31/api/trade/export/agent/statistic/excel',
        method: 'get',
        params,
        timeout: '60000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getProfitsexcel (params) { // 导出分润统计
    return request({
        url: urlexcel + '/v31/api/trade/export/getProfits/excel',
        method: 'get',
        params,
        timeout: '60000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function transactionexcel (params) { // 导出清算查询
    return request({
        url: urlexcel + '/v31/api/trade/transaction/excel',
        method: 'get',
        params,
        timeout: '60000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function merchantdetailexcel (params) { // 导出商户订单统计详情
    return request({
        url: urlexcel + '/v31/api/trade/export/merchant/detail/excel',
        method: 'get',
        params,
        timeout: '60000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function profitdetailexcel (params) { // 服务商分润详情（商户每笔订单分润）导出
    return request({
        url: urlexcel + '/v31/api/trade/export/profitdetail/excel',
        method: 'get',
        params,
        timeout: '60000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function myMerchantExcel (params) { // 我的商户导出导出
    return request({
        url: urlexcel + '/v31/api/merchant/export/excel',
        method: 'get',
        params,
        timeout: '60000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function shopExcel (params) { // 我的门店导出
    return request({
        url: urlexcel + '/v31/api/merchant/shop/export/excel',
        method: 'get',
        params,
        timeout: '60000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function storesExportExcel (params) { // 门店交易统计导出
    return request({
        url: urlexcel + '/v31/api/trade/export/shop/excel',
        method: 'get',
        params,
        timeout: '60000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function merchanttransfer (data, id) { // 修改业务经理
    return request({
        url: url + '/v31/api/merchant/transfer/' + id,
        method: 'post',
        data,
        headers: {
            "Content-Type": "application/json",
            "token": sessionStorage.getItem('token')
        }
    })
}
export function wechatRegistry (data, id) { // 申请小微进件
    return request({
        url: url + '/v31/api/merchant/wechatRegistry/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function elecContractSign (params, id) { // 签约随行付电子协议
    return request({
        url: url + '/v31/api/merchant/sxf/elecContractSign/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getSignInfoMerchant (params, id) { // 用户信息 商户登陆 签约信息
    return request({
        url: url + '/v31/api/merchant/getSignInfo/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getInventory (params) { // 库存管理 获取数据列表
    return request({
        url: url + '/v31/api/inventory/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getInventoryCategoryListlev (params) { // 库存管理 获取设备类型
    return request({
        url: url + '/v31/api/inventoryCategory/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getInventoryExport (data) { // 库存管理 出库
    return request({
        url: url + '/v31/api/inventory/export',
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getInventoryImportSingle (data) { // 库存管理 单个入库
    return request({
        url: url + '/v31/api/inventory/importSingle',
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getInventoryUpdate (data, id) { // 库存管理 单个编辑
    return request({
        url: url + '/v31/api/inventory/update/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getInventoryBatchRemove (data) { // 库存管理 删除和批量删除
    return request({
        url: url + '/v31/api/inventory/batchRemove',
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getInventoryBatchSwitchHolder (data) { // 库存管理 批量切换
    return request({
        url: url + '/v31/api/inventory/batchSwitchHolder',
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getInventoryBatchIn (data) { // 库存管理 批量修改入库
    return request({
        url: url + '/v31/api/inventory/batchIn',
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getInventoryExcel (params) { // 库存管理 库存导出
    return request({
        url: urlexcel + '/v31/api/inventory/export/excel',
        method: 'get',
        params,
        timeout: '60000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getlabelTagPage (params) { // 标签管理 获取标签列表
    return request({
        url: url + '/v31/api/tag/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getlabelTagList (params) { // 标签管理 标签模糊
    return request({
        url: url + '/v31/api/tag/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getDimensionTagList (params) {// 标签管理 根据维度标签模糊
    return request({
        url: url + '/v31/api/dimensionTag/getRoleSelectTags',
        method: 'get',
        params,
        headers: { "token": sessionStorage.getItem('token') }
    })
}
export function getlabelTagSave (data) {// 标签管理 新增标签
    return request({
        url: url + '/v31/api/tag/save',
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getlabelTagUpdate (data, id) { // 标签管理 标签编辑
    return request({
        url: url + '/v31/api/tag/update/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getlabelTagDelete (data, id) { // 标签管理 标签删除
    return request({
        url: url + '/v31/api/tag/delete/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getlabelTagDetails (params, id) { // 标签管理 获取详情页数据
    return request({
        url: url + '/v31/api/tag/get/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postDimensionTagRemove (data, id) {// 详情页 标签删除功能
    return request({
        url: url + '/v31/api/dimensionTag/remove/' + id,
        method: 'post',
        data,
        headers: { "token": sessionStorage.getItem('token') }
    })
}
export function setGreenStatus (data, id) { // 开通绿洲
    return request({
        url: url + '/v31/api/merchant/channel/setGreenStatus/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function setBlueStatus (data, id) { // 开通蓝海
    return request({
        url: url + '/v31/api/merchant/channel/setBlueStatus/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
// 修改微信关注配置
export function appsave (data) {
    return request({
        url: url + '/v31/api/merchant/app/save',
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
// 删除微信关注配置
export function appremove (data, id) {
    return request({
        url: url + '/v31/api/merchant/app/remove/' + id,
        method: 'delete',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function shopdeletes (data, id) { // 停用门店
    return request({
        url: url + '/v31/api/merchant/shop/delete/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getDeviceType (params) { // 标签管理 获取详情页数据
    return request({
        url: url + '/v31/api/inventoryCategory/getDeviceType',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postAdMaterial (data) { // 广告管理 广告素材 上传素材
    return request({
        url: url + '/v31/api/adMaterial/save',
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getAdMaterialPage (params) { // 广告管理 广告素材 获取素材列表
    return request({
        url: url + '/v31/api/adMaterial/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postAdMaterialDelete (data, id) { // 广告管理 广告素材 删除素材
    return request({
        url: url + '/v31/api/adMaterial/delete/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postAdInfoSave (data) { // 广告管理 发布广告
    return request({
        url: url + '/v31/api/adInfo/save',
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getAdInfoPage (params) { // 广告管理 获取广告列表
    return request({
        url: url + '/v31/api/adInfo/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getAdInfoEdit (params, id) { // 广告管理 获取广告详情
    return request({
        url: url + '/v31/api/adInfo/get/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postAdInfoUpdate (data, id) { // 广告管理 编辑提交
    return request({
        url: url + '/v31/api/adInfo/update/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postAdInfoSuspend (data, id) { // 广告管理 暂停广告 
    return request({
        url: url + '/v31/api/adInfo/suspend/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postAdInfoDelete (data, id) { // 广告管理 删除广告 
    return request({
        url: url + '/v31/api/adInfo/delete/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function postAdInfoStart (data, id) { // 广告管理 广告上架
    return request({
        url: url + '/v31/api/adInfo/start/' + id,
        method: 'post',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function inventoryCategorylist (params) { // 获取设备品牌
    return request({
        url: url + '/v31/api/inventoryCategory/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function agentoem (params) { // 获取OEM配置
    return request({
        url: url + '/v31/api/agent/oem',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function oemupdate (data) { //修改OEM配合
    return request({
        url: url + '/v31/api/agent/oem/update',
        method: 'POST',
        data,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function oemsave (data) { //一级服务商开通OEM
    return request({
        url: url + '/v31/api/agent/oem/save',
        method: 'POST',
        data,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function setLimitInst (data) { //开通机构限额
    return request({
        url: url + '/v31/api/inst/setLimitInst',
        method: 'POST',
        data,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function findUserInst (params) { // 查询用户关联的机构
    return request({
        url: url + '/v31/api/inst/findUserInst',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function recharge (params) { // 机构额度充值
    return request({
        url: url + '/openpay/inst/recharge',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function chargeOrderQuery (params) { // 查询充值是否成功
    return request({
        url: url + '/v31/api/inst/chargeOrderQuery',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function instid (params, id) { // 机构详情
    return request({
        url: url + '/v31/api/inst/get/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function chargeOrderPage (params) { // 重充值列表
    return request({
        url: url + '/v31/api/inst/chargeOrderPage',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getLimitNum (params, id) { // 查询机构额度
    return request({
        url: url + '/v31/api/inst/getLimitNum/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function configLimit (data) { //手动调整机构额度
    return request({
        url: url + '/v31/api/inst/configLimit',
        method: 'POST',
        data,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function goodspage (params) { // 商品列表
    return request({
        url: url + '/v31/api/goods/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function goodsCategorylist (params) { // 获取商品分类
    return request({
        url: url + '/v31/api/goodsCategory/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function goodssave (data) { //新增商品
    return request({
        url: url + '/v31/api/goods/save/',
        method: 'POST',
        data,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function goodsupdate (data, id) { //修改商品
    return request({
        url: url + '/v31/api/goods/update/' + id,
        method: 'POST',
        data,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function goodsremove (data, id) { //修改商品
    return request({
        url: url + '/v31/api/goods/remove/' + id,
        method: 'POST',
        data,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function goodsget (params, id) { // 获取商品详情
    return request({
        url: url + '/v31/api/goods/get/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function rentTradepage (params) { // 信用租账单列表
    return request({
        url: url + '/v31/api/rentTrade/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function rentTradeget (params, id) { // 信用租账单详情
    return request({
        url: url + '/v31/api/rentTrade/get/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function rentpage (params) { // 信用租商品列表
    return request({
        url: url + '/v31/api/rent/page',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function unFreeze (data, id) { //撤销订单
    return request({
        url: url + '/v31/api/rent/unFreeze/' + id,
        method: 'POST',
        data,
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function dictionarylist (params) { // 获取通道
    return request({
        url: url + '/v3/sbapi/dictionary/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}

export function chainopen (params) { // 开通总分店模式
    return request({
        url: url + '/v31/api/merchant/chain/open',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function chainclose (params) { // 关闭总分店模式
    return request({
        url: url + '/v31/api/merchant/chain/close',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function chaindetail (params) { // 总分店模式信息详情
    return request({
        url: url + '/v31/api/merchant/chain/detail',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function chainupdate (params) { // 更新总分店模式配置
    return request({
        url: url + '/v31/api/merchant/chain/update',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function tradeNotify (params) { //补发通知
    return request({
        url: url + '/v31/api/trade/tradeNotify',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function hlspage (params) { //华莱士对账单
    return request({
        url: urlexcel + '/v31/api/hls/page',
        method: 'get',
        params,
        headers: {
            "Content-Type": 'application/json;charset=utf-8',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function hlsexcel (params) { // 导出华莱士对账单
    return request({
        url: urlexcel + '/v31/api/hls/excel',
        method: 'get',
        params,
        timeout: '180000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function chainsubs (params) { // 查询通道分店商户列表
    return request({
        url: urlexcel + '/v31/api/merchant/chain/subs',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function splitinfo (params) { // 查询商户通道分账配置
    return request({
        url: urlexcel + '/v31/api/merchant/split/info',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function splitconfigt (data) { //总店商户通道分账配置
    return request({
        url: url + '/produc/v31/api/merchant/split/configt',
        method: 'POST',
        data,
        headers: {
            "Content-Type": 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function splitopen (params) { // 商户开通通道分账
    return request({
        url: urlexcel + '/v31/api/merchant/split/open',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function joblist (params) { // 定时任务列表
    return request({
        url: urlexcel + '/v31/api/job/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jobadd (data) { //新增定时任务
    return request({
        url: url + '/v31/api/job/add',
        method: 'POST',
        data,
        headers: {
            // "Content-Type": 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jobupdate (data) { //修改定时任务
    return request({
        url: url + '/v31/api/job/update',
        method: 'POST',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jobpause (params, id) { // 暂停任务
    return request({
        url: urlexcel + '/v31/api/job/pause/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jobstart (params, id) { // 启动任务
    return request({
        url: urlexcel + '/v31/api/job/start/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function jobdelete (params, id) { // 删除任务
    return request({
        url: urlexcel + '/v31/api/job/delete/' + id,
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function paycfg (data, id) { //商户支付权限配置
    return request({
        url: url + '/v31/api/merchant/pay/cfg/' + id,
        method: 'POST',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getBdStatistics (params) { // 业务经理交易统计分页
    return request({
        url: urlexcel + '/v31/api/trade/getBdStatistics',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function bdstatisticexcel (params) { // 导出业务经理交易统计
    return request({
        url: urlexcel + '/v31/api/trade/export/bd/statistic/excel',
        method: 'get',
        params,
        timeout: '180000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function get3Bind (data, id) { //获取IoT设备三绑定参数
    return request({
        url: url + '/v31/api/terminal/get3Bind/' + id,
        method: 'POST',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function config3Bind (data) { //IoT设备三绑定
    return request({
        url: url + '/v31/api/terminal/config3Bind',
        method: 'POST',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function operationresult (params) { // 查询服务商代运营操作结果
    return request({
        url: url + '/v31/alipay/operation/result',
        method: 'get',
        params,
        timeout: '180000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function operationapply (params) { // 向商户支付宝发起授权推送
    return request({
        url: url + '/v31/alipay/operation/apply',
        method: 'get',
        params,
        timeout: '180000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function syncShop (params) { // 同步支付宝门店信息
    return request({
        url: url + '/v31/alipay/operation/syncShop',
        method: 'get',
        params,
        timeout: '180000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function usersLogpage (params) { // 日志列表
    return request({
        url: url + '/v31/api/usersLog/page',
        method: 'get',
        params,
        timeout: '180000',
        headers: {
            'Content-Type': 'application/json',
            "token": sessionStorage.getItem('token')
        }
    })
}
export function blueSeaquery (data) { //蓝海活动报名查询
    return request({
        url: url + '/v31/alipay/blueSea/query',
        method: 'POST',
        data,
        headers: {
            "token": sessionStorage.getItem('token'),
        }
    })
}
export function blueSeaapply (data) { //蓝海活动报名申请
    return request({
        url: url + '/v31/alipay/blueSea/apply',
        method: 'POST',
        data,
        timeout: '50000',
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function blueSeamodify (data) { //蓝海活动报名修改
    return request({
        url: url + '/v31/alipay/blueSea/modify',
        method: 'POST',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function platacct (params) { // 查询平台商户子账户余额
    return request({
        url: urlexcel + '/v31/api/plat/acct',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function acctFunc (params) { // 查询平台功能子账户余额
    return request({
        url: urlexcel + '/v31/api/plat/acctFunc',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function withdraw (params) { // 平台商户子账户提现
    return request({
        url: urlexcel + '/v31/api/plat/withdraw',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function withdrawquery (params) { // 查询提现记录
    return request({
        url: urlexcel + '/v31/api/plat/withdraw/query',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function refundauditor (params) { // 获取审核退款的财务人员list
    return request({
        url: urlexcel + '/v31/api/trade/audit/auditor/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function refundapply (data,id) { //指定财务人员发起退款申请
    return request({
        url: url + '/v31/api/trade/audit/refund/' + id,
        method: 'POST',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function getBdChart (params) { // 首页业态当天交易额
    return request({
        url: urlexcel + '/v31/api/trade/getBdChart',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function applylist (params) { // 退款审核列表
    return request({
        url: urlexcel + '/v31/api/trade/audit/apply/list',
        method: 'get',
        params,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function auditpass (data,id) { //退款申请通过
    return request({
        url: url + '/v31/api/trade/audit/audit/pass',
        method: 'POST',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}
export function auditreject (data,id) { //退款申请拒绝
    return request({
        url: url + '/v31/api/trade/audit/audit/reject',
        method: 'POST',
        data,
        headers: {
            "token": sessionStorage.getItem('token')
        }
    })
}


































